<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
	<input type="text" id="num">
	<input type="button" onclick="bian()" value="判断">
 </body>
 <script>
	
	function bian(){
	var x = num.value;
	if (x > 0){	
		document.write("大于0");
	}else if (x < 0){
		document.write("小于0");
	}else if (x == 0){	
		document.write("等于0");
	}
 }
 
 
 </script>
</html>
